package cate.common.table.dynins;

import cate.common.table.ESheet;
import easy.java.dev.note.NoteClass;

@NoteClass( "阶级映射")
public class DynHeroGradeSheet extends ESheet<DynHeroGradeRow> {

    @Override
    public String getSheetName() {
        return "阶级映射";
    }

    @Override
    protected DynHeroGradeRow buildRow() {
        return new DynHeroGradeRow();
    }

    public int getOffSet(int level) {
        for (DynHeroGradeRow row : this.getList()) {
            if (level >= row.start && level <= row.end) {
                return row.offset;
            }
        }
        return 0;
    }

}
